MODNAME ?= demo
# 关闭模块验证
CONFIG_MODULE_SIG=n
CONFIG_MODULE_SIG_ALL=n
KNERNELDIR := /lib/modules/$(shell uname -r)/build/
# KNERNELDIR := /home/linux/kernel/kernel-3.4.39/
PWD := $(shell pwd)

all:
	@#-C进入内核顶层目录执行Makefile文件
	@#make modules 编译模块
	@#M=$(PWD) 告诉内核编译那个路径下的模块
	make -C $(KNERNELDIR) M=$(PWD)  modules
#	arm-none-linux-gnueabi-gcc test.c -o ADC-app

install:
	cp *.ko ~/rootfs/
#	cp ADC-app ~/rootfs/
clean:
	make -C $(KNERNELDIR) M=$(PWD)  clean

obj-m := $(MODNAME).o

